/*
 * StreamConnector.h
 *
 *  Created on: Oct 10, 2012
 *      Author: nam20485
 */

#ifndef STREAMCONNECTOR_H_
#define STREAMCONNECTOR_H_

#include "IConnector.h"

class StreamConnector: public IConnector
{
public:
	StreamConnector(Stream& stream)
		: m_stream(stream)
	{}

	virtual ~StreamConnector();

	virtual bool Connect();
	virtual bool Disconnect();

protected:
	Stream& m_stream;

	virtual size_t ReadBytes(BYTE* pBuff, size_t count);
	virtual size_t WriteBytes(const BYTE* pBytes, size_t count);
};

#endif /* STREAMCONNECTOR_H_ */
